-
Notifications
You must be signed in to change notification settings - Fork 371
[Intel GPU] Enable optim SR test #3055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Intel GPU] Enable optim SR test #3055
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3055
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit b1121ac with merge base f92b898 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
test/test_low_bit_optim.py
Outdated
| torch.testing.assert_close(p2, p1) | ||
|
|
||
| @parametrize("device", _DEVICES) | ||
| def test_optim_bf16_stochastic_round_correctness(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device arg is not added to the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arlesniak _DEVICES is the global variable in this file, I don't think your change is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "test_optim_bf16_stochastic_round_correctness" should be parametrized with _DEVICES global variable, which contains other devices (XPU if detected). Without the PR changes the choice was cuda, cpu only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? According to this code,https://github.com/pytorch/ao/blob/main/torchao/utils.py#L143 when the xpu is available in your ENV, the _DEVICES will contain the XPU.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me be more precise. You're right, the _DEVICES list will contain XPU if detected. Without the PR changes the test will be triggered once with the hardcoded device choice - cuda or cpu: https://github.com/pytorch/ao/blob/main/test/test_low_bit_optim.py#L423, regardless of _DEVICES content.
After the PR changes, the test will be triggered separately for every device from the _DEVICES including XPU (similiar to some other parametrized tests i.e. test_quantize_8bit_with_qmap_correctness etc).
cfd22f6 to
b1121ac
Compare
|
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
Enable optim_bf16_stochastic_round_correctness test for XPU